package com.cloudcc.mobile.view.aduit.model.impl;



import com.cloudcc.mobile.basebean.BaseListEntity;
import com.cloudcc.mobile.util.ApiUtil;
import com.cloudcc.mobile.view.aduit.api.AduitNearByApi;
import com.cloudcc.mobile.view.aduit.bean.assetsBean;
import com.cloudcc.mobile.view.aduit.bean.shopBean;
import com.cloudcc.mobile.view.aduit.model.IAduitNearByModel;

import java.util.Map;

import rx.Observable;

/**
 * <pre>
 *     author : 92152
 *     e-mail : xxx@xx
 *     time   : 2019/12/04
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class AduitNearByModel implements IAduitNearByModel {
    private AduitNearByApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public AduitNearByApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(AduitNearByApi.class);
        }
    }

    @Override
    public Observable<BaseListEntity<shopBean>> inquireShopData(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireShopData(praise);
    }

    @Override
    public Observable<BaseListEntity<assetsBean>> inquireAssetsData(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireAssetsData(praise);
    }
}
